      1  import java.awt.BorderLayout;

      2  import javax.swing.JButton;

      3  import javax.swing.JFrame;

      4

      5  public class SelectionSortViewer

      6  {

      7     public static void main(String[] args)

      8     {

      9        JFrame frame = new JFrame();

     10

     11        final int FRAME_WIDTH = 300;

     12        final int FRAME_HEIGHT = 400;

     13

     14        frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);

     15        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

     16

     17        final SelectionSortComponent component

     18              = new SelectionSortComponent();

     19        frame.add(component, BorderLayout.CENTER);

     20

     21        frame.setVisible(true);

     22        component.startAnimation();

     23     }

     24  }